/**
 * @author Clark
 * @email haixuanwoTxh@gmail.com
 * @date 2021-10-23
 */

#include "logupwindow.h"
#include "ui_logupwindow.h"

logupwindow::logupwindow(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::logup)
{
    ui->setupUi(this);
}

logupwindow::~logupwindow()
{
    delete ui;
}

void logupwindow::on_pushButtonQuit_clicked()
{
    emit go_closed();
    this->close();
}

void logupwindow::closeEvent(QCloseEvent *event)
{
    emit go_closed();
    this->close();
}

/**
 * @brief
 * len1[2]+user[len1]+len2[2]+passwd[len2]
 */
void logupwindow::on_pushButtonLogup_clicked()
{
    QString user = ui->lineEditUser->text();
    QString passwd = ui->lineEditPasswd->text();

    emit logup_new_user(user, passwd);
}
